package etec.foxsoft.telas;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.JSeparator;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.BevelBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.JScrollBar;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JScrollPane;

public class Contatos extends JFrame {

	private JPanel contentPane;
	private JTable table;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Contatos frame = new Contatos();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Contatos() {
		setResizable(false);
		setTitle("FoxSoft1.0V");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 880, 620);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblLogo = new JLabel("");
		lblLogo.setIcon(new ImageIcon(Contatos.class.getResource("/Imagens/Logo_Paris.png")));
		lblLogo.setBounds(10, 0, 232, 99);
		contentPane.add(lblLogo);
		
		JLabel lblNomeCentral = new JLabel("Contatos");
		lblNomeCentral.setHorizontalAlignment(SwingConstants.CENTER);
		lblNomeCentral.setFont(new Font("Tahoma", Font.PLAIN, 20));
		lblNomeCentral.setBounds(380, 89, 106, 25);
		contentPane.add(lblNomeCentral);
		
		JSeparator separator = new JSeparator();
		separator.setBounds(483, 102, 370, 14);
		contentPane.add(separator);
		
		JSeparator separator_1 = new JSeparator();
		separator_1.setBounds(10, 102, 370, 14);
		contentPane.add(separator_1);
		
		JButton botao_consultar = new JButton("Consultar");
		botao_consultar.setBounds(390, 125, 106, 33);
		contentPane.add(botao_consultar);
		
		JButton botao_imprimir = new JButton("Imprimir");
		botao_imprimir.setBounds(516, 125, 106, 33);
		contentPane.add(botao_imprimir);
		
		JButton botao_editar = new JButton("Editar");
		botao_editar.setBounds(265, 125, 106, 33);
		contentPane.add(botao_editar);
		
		JButton botao_fechar = new JButton("Fechar");
		botao_fechar.setIcon(new ImageIcon(Contatos.class.getResource("/Imagens/Fechar.png")));
		botao_fechar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
								
					setVisible(false);
					
					
					}//Deixar Janela Oculta
		});
		botao_fechar.setBounds(739, 548, 115, 23);
		contentPane.add(botao_fechar);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 165, 843, 348);
		contentPane.add(scrollPane);
		
		table = new JTable();
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
			},
			new String[] {
				"ID", "Nome", "Endere\u00E7o", "Cidade", "Tel. Com.", "Tel. Res.", "e-mail", "Celular"
			}
		));
		scrollPane.setViewportView(table);
		
		JButton ajuda = new JButton("");
		ajuda.setIcon(new ImageIcon(Contatos.class.getResource("/Imagens/Ajuda.png")));
		ajuda.setBounds(649, 11, 80, 80);
		contentPane.add(ajuda);
		
		JButton sobre = new JButton("");
		sobre.setIcon(new ImageIcon(Contatos.class.getResource("/Imagens/Sobre.png")));
		sobre.setBounds(773, 11, 80, 80);
		contentPane.add(sobre);
	}

}
